The present invention relates to compounds of formula (I), which are useful for treating disorders caused by or exacerbated by vanilloid receptor activity, pharmaceutical compositions containing compounds of formula (I) and are useful in treating pain, bladder overactivity, and urinary incontinence.